<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>OpenShoe: udi_cdc.c File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenShoe
   &#160;<span id="projectnumber">0.1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#define-members">Defines</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">udi_cdc.c File Reference</div>  </div>
</div>
<div class="contents">

<p>USB Device Communication Device Class (CDC) interface.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="conf__usb_8h_source.html">conf_usb.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="usb__protocol_8h_source.html">usb_protocol.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="usb__protocol__cdc_8h_source.html">usb_protocol_cdc.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="udd_8h_source.html">udd.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="udc_8h_source.html">udc.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="udi__cdc_8h_source.html">udi_cdc.h</a>&quot;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
</div><table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="udi__cdc_8c.html#a6f3d34eb0f2fa47047521c97b1c0b110">UDI_CDC_TX_BUFFERS</a>&#160;&#160;&#160;(5*UDI_CDC_DATA_EPS_SIZE)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="udi__cdc_8c.html#a5ca1c336726b1cea7a4603cef001341e">UDI_CDC_RX_BUFFERS</a>&#160;&#160;&#160;(5*UDI_CDC_DATA_EPS_SIZE)</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__udi__cdc__group.html#ga5507164c7c4ff2c9b94af48229dc0c3c">udi_cdc_ctrl_signal_dcd</a> (bool b_set)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Notify a state change of DCD signal.  <a href="group__udi__cdc__group.html#ga5507164c7c4ff2c9b94af48229dc0c3c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__udi__cdc__group.html#ga6b34b223f6c03cd35fc16d29cb9cfb78">udi_cdc_ctrl_signal_dsr</a> (bool b_set)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Notify a state change of DSR signal.  <a href="group__udi__cdc__group.html#ga6b34b223f6c03cd35fc16d29cb9cfb78"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__udi__cdc__group.html#gaf62c55c329d7e7ff3913274b124e54aa">udi_cdc_signal_framing_error</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Notify a framing error.  <a href="group__udi__cdc__group.html#gaf62c55c329d7e7ff3913274b124e54aa"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__udi__cdc__group.html#gab6dd1be8afa57a1bece870338bdc5f74">udi_cdc_signal_parity_error</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Notify a parity error.  <a href="group__udi__cdc__group.html#gab6dd1be8afa57a1bece870338bdc5f74"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__udi__cdc__group.html#ga7730a564c9cb117af611958500a4fa7f">udi_cdc_signal_overrun</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Notify a overrun.  <a href="group__udi__cdc__group.html#ga7730a564c9cb117af611958500a4fa7f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__udi__cdc__group.html#gab5beb4e918e089e0eacf20dba1df73ea">udi_cdc_is_rx_ready</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This function checks if a character has been received on the CDC line.  <a href="group__udi__cdc__group.html#gab5beb4e918e089e0eacf20dba1df73ea"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__udi__cdc__group.html#ga202f3fd7b153f6e1a41601735e0febb6">udi_cdc_getc</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Waits and gets a value on CDC line.  <a href="group__udi__cdc__group.html#ga202f3fd7b153f6e1a41601735e0febb6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">iram_size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__udi__cdc__group.html#gaa7374616de8bc3a83de3f1884b56fa39">udi_cdc_read_buf</a> (int *buf, iram_size_t size)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads a RAM buffer on CDC line.  <a href="group__udi__cdc__group.html#gaa7374616de8bc3a83de3f1884b56fa39"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__udi__cdc__group.html#ga7d0d458a5731da95dd05f30714c42dde">udi_cdc_is_tx_ready</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">This function checks if a new character sent is possible The type int is used to support scanf redirection from compiler LIB.  <a href="group__udi__cdc__group.html#ga7d0d458a5731da95dd05f30714c42dde"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__udi__cdc__group.html#ga8faae3fcf4911017c0fcf0aa127179f6">udi_cdc_putc</a> (int value)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Puts a byte on CDC line The type int is used to support printf redirection from compiler LIB.  <a href="group__udi__cdc__group.html#ga8faae3fcf4911017c0fcf0aa127179f6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">iram_size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__udi__cdc__group.html#ga88f09b3f954620d37bf882e6d1874c42">udi_cdc_write_buf</a> (const int *buf, iram_size_t size)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Writes a RAM buffer on CDC line.  <a href="group__udi__cdc__group.html#ga88f09b3f954620d37bf882e6d1874c42"></a><br/></td></tr>
<tr><td colspan="2"><div class="groupHeader">Routines to control serial line</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__udi__cdc__group.html#gab674a6567bc8b0da4afa5add7c361c00">udi_cdc_line_coding_received</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends lien coding to application.  <a href="group__udi__cdc__group.html#gab674a6567bc8b0da4afa5add7c361c00"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__udi__cdc__group.html#gaec142bc6fba06ca35a45d33f31840db7">udi_cdc_serial_state_msg_sent</a> (<a class="el" href="group__udd__group.html#gac0f77f5a0e085af1242b48fd1054959a">udd_ep_status_t</a> status, iram_size_t n)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Ack sent of serial state message Callback called after serial state message sent.  <a href="group__udi__cdc__group.html#gaec142bc6fba06ca35a45d33f31840db7"></a><br/></td></tr>
<tr><td colspan="2"><div class="groupHeader">Routines to process data transfer</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__udi__cdc__group.html#gaa720107e691aac776090aabc23884eb6">udi_cdc_data_recevied</a> (<a class="el" href="group__udd__group.html#gac0f77f5a0e085af1242b48fd1054959a">udd_ep_status_t</a> status, iram_size_t n)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Update RX buffer management with a new data Callback called after data reception on USB line.  <a href="group__udi__cdc__group.html#gaa720107e691aac776090aabc23884eb6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__udi__cdc__group.html#gac8eef4d87000686e33f73efda71c6e10">udi_cdc_data_sent</a> (<a class="el" href="group__udd__group.html#gac0f77f5a0e085af1242b48fd1054959a">udd_ep_status_t</a> status, iram_size_t n)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Valid TX buffer sent Callback called after data transfer on USB line.  <a href="group__udi__cdc__group.html#gac8eef4d87000686e33f73efda71c6e10"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="member-group"></a>
Interface for UDC</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">UDC_DESC_STORAGE <a class="el" href="structudi__api__t.html">udi_api_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__udi__cdc__group.html#gad7b0a90350a1f1a7c62fab1a749bf687">udi_api_cdc_comm</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Global structure which contains standard UDI API for UDC.  <a href="group__udi__cdc__group.html#gad7b0a90350a1f1a7c62fab1a749bf687"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">UDC_DESC_STORAGE <a class="el" href="structudi__api__t.html">udi_api_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__udi__cdc__group.html#ga3f85c229cc3218b75cb4844b8e9ad2d7">udi_api_cdc_data</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__udi__cdc__group.html#ga48b8cd17138f1e31d2f705e47bd798fc">udi_cdc_comm_enable</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__udi__cdc__group.html#ga1d9234e7ec38cb7fbc306b1d4624ac7d">udi_cdc_comm_disable</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__udi__cdc__group.html#ga9f1ce6a914bf00a929285d4b9876ff6c">udi_cdc_comm_setup</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__udi__cdc__group.html#gacff97f0d95101ef8beebe3a7d5cf1541">udi_cdc_data_enable</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__udi__cdc__group.html#gad6183b6bb4f836b69c2a176b8a1631da">udi_cdc_data_disable</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__udi__cdc__group.html#ga9a66dccf928f55850d243abd1ca51eb3">udi_cdc_data_setup</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__udi__cdc__group.html#ga89512d97844e09864336d3df2f73af59">udi_cdc_getsetting</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__udi__cdc__group.html#ga304bed0ef46f8046e41de6e161db0864">udi_cdc_data_sof_notify</a> (void)</td></tr>
<tr><td colspan="2"><h2><a name="member-group"></a>
Variables to manage RX/TX transfer requests</h2></td></tr>
<tr><td class="ititle" colspan="2"><p><a class="anchor" id="amgrp212b06c4e5cdd346092967876fa4335a"></a> Two buffers for each sense are used to optimize the speed. </p>
</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__udi__cdc__group.html#ga91892013c1c5dcb7fa2127ac2e2090f7">UDI_CDC_TRANS_HALTED</a>&#160;&#160;&#160;2</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Define a transfer halted.  <a href="group__udi__cdc__group.html#ga91892013c1c5dcb7fa2127ac2e2090f7"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>USB Device Communication Device Class (CDC) interface. </p>
<p>Copyright (C) 2009-2011 Atmel Corporation. All rights reserved. </p>
</div><hr/><h2>Define Documentation</h2>
<a class="anchor" id="a5ca1c336726b1cea7a4603cef001341e"></a><!-- doxytag: member="udi_cdc.c::UDI_CDC_RX_BUFFERS" ref="a5ca1c336726b1cea7a4603cef001341e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UDI_CDC_RX_BUFFERS&#160;&#160;&#160;(5*UDI_CDC_DATA_EPS_SIZE)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a6f3d34eb0f2fa47047521c97b1c0b110"></a><!-- doxytag: member="udi_cdc.c::UDI_CDC_TX_BUFFERS" ref="a6f3d34eb0f2fa47047521c97b1c0b110" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define UDI_CDC_TX_BUFFERS&#160;&#160;&#160;(5*UDI_CDC_DATA_EPS_SIZE)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Mon Dec 19 2011 21:04:53 for OpenShoe by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
